package com.roadmap.entities;

import java.util.Date;

import com.roadmap.common.BaseAuthEntity;

public class LifePlan extends BaseAuthEntity {
	private String goalId;
	private String aspirantId;
	private String name;
	private String content;
	private Date scheduledStartDate;
	private Date scheduledEndDate;
	private Date realStartDate;
	private Date realEndDate;
	private int score;

	public LifePlan() {
		super();
		Date dt = new Date();
		this.scheduledStartDate = dt;
		this.scheduledEndDate = dt;
		this.score = 0;
	}

	public String getGoalId() {
		return goalId;
	}

	public void setGoalId(String goalId) {
		this.goalId = goalId;
	}

	public String getAspirantId() {
		return aspirantId;
	}

	public void setAspirantId(String aspirantId) {
		this.aspirantId = aspirantId;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public Date getScheduledStartDate() {
		return scheduledStartDate;
	}

	public void setScheduledStartDate(Date scheduledStartDate) {
		this.scheduledStartDate = scheduledStartDate;
	}

	public Date getScheduledEndDate() {
		return scheduledEndDate;
	}

	public void setScheduledEndDate(Date scheduledEndDate) {
		this.scheduledEndDate = scheduledEndDate;
	}

	public Date getRealStartDate() {
		return realStartDate;
	}

	public void setRealStartDate(Date realStartDate) {
		this.realStartDate = realStartDate;
	}

	public Date getRealEndDate() {
		return realEndDate;
	}

	public void setRealEndDate(Date realEndDate) {
		this.realEndDate = realEndDate;
	}

	public int getScore() {
		return score;
	}

	public void setScore(int score) {
		this.score = score;
	}

	@Override
	public String getWhatItIs() {
		if (getName() != null && getName().length() > DESP_MAX_LENGTH) {
			return getName().substring(0, DESP_MAX_LENGTH) + "...";
		}
		return getName();
	}

}
